package com.guohengspace.mq.model.query;


import cn.hutool.core.annotation.Alias;
import com.aliyun.oss.model.PartETag;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

@Data
@ApiModel
public class UpLoadPartParam {
    @ApiModelProperty(name = "accessKeyId", value = "组织ak", dataType = "String",  example = "1111",required = true)
    private String accessKeyId;
    @ApiModelProperty(name = "accessKeySecret", value = "组织sk", dataType = "String",  example = "1111",required = true)
    private String accessKeySecret;
    @ApiModelProperty(name = "uploadId", value = "全局 uploadId", dataType = "String",  example = "1111",required = true)
    private String uploadId ;
    @ApiModelProperty(name = "qqfilename", value = "文件名称 qqfilename ", dataType = "String",  example = "1111",required = true)
    @Alias("qqfilename")
    private String qqfilename;
//    @ApiModelProperty(name = "accessKeyId", value = "组织ak", dataType = "String",  example = "1111")
//    private InputStream inputStream ;

    @ApiModelProperty(value = "当前文件的分片对象 qqfile", required = true)
    @Alias("qqfile")
    private MultipartFile qqfile;
    /**
     * 分片文件大小
     */
    @ApiModelProperty(name = "qqchunksize", value = "分片文件大小 qqchunksize", dataType = "long",  example = "1024")
    @Alias("qqchunksize")
    private long qqchunksize;
    /**
     * 分片文件序号
     */
    @Alias("qqpartindex")
    @ApiModelProperty(name = "qqpartindex", value = "分片文件序号 qqpartindex", dataType = "int",  example = "1")
    private int qqpartindex; // 从 1 开始

    @Alias("qqtotalparts")
    @ApiModelProperty(name = "qqtotalparts", value = "总分片文件序号 qqtotalparts", dataType = "int",  example = "1")
    private int qqtotalparts; // 从 1 开始

//    @ApiModelProperty(name = "isLast", value = "是否为最后一片", dataType = "boolean",  example = "false")
//    private boolean isLast;


    @ApiModelProperty(name = "partETags", value = "上传后返回的分片信息", dataType = "List",  example = "[]")
    List<PartETag> partETags ;
}
